<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form id="signupForm">
    <div class="form-group">
        <input type="text" class="form-control" name="loginName" v-model="username"
               placeholder="账号">
    </div>
    <div class="form-group">
        <input type="password" name="password" class="form-control" v-model="pwd"
               placeholder="密码">
    </div>
    <button type="button" class="btn btn-primary block full-width m-b">登 录<button>

</form>

<script src="lib/jquery/jquery.js"></script>

<script>
    $('button').click(function(){
        $.ajax({
            type : "get",
            url : "http://192.168.1.130:8080/sys/user/login",
            data : {loginName:$("input:eq(0)").val(),password:$("input:eq(1)").val()},
            success : function(data) {
            if(data.success){
                window.location.href='index.html'

            }else{
                alert(data.msg)
            }
        },
        error : function(){
            alert("登录失败");
        }
    })
    })

</script>
</body>
</html>
